var http = require('http');
var server = http.createServer(function(req, res) {
	console.log('--request--');
	// not send method , send is a express function 
	// res.send('abc');
	res.writeHead(200, {
		'Content-type': 'text/plain'
	});
	res.end('Hello, world\n');
});
server.listen(8080, '127.0.0.1');
console.log('server start...');

// test the app
// node chp1-1.js
// in new cmd, type : curl -i 127.0.0.1:8080
